
local art = class.panel.create('',10,50,86,64,24,4)

local ui = art:add_text('',0,0,nil,nil,24,5)
ui:set_color(0xffff0000)

ac.hardware:event '界面绘制'(function()
    local player = ac.player.self
    local hero = player.hero
    if hero and player:is_self() then
        if hero.fh_timer then
            local num = hero.fh_timer:get_remaining()/1000
            if num>1 then
                ui:set_text(('%0.f'):format(num))
            else
                ui:set_text(('%0.1f'):format(num))
            end
            ui:show()
        else
            ui:hide()
        end
        art:show()
    else
        art:hide()
    end
end)